home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-29 | 40.0 KB | 1,346 lines |
- Newsgroups: comp.sources.misc
- From: dvadura@plg.waterloo.edu (Dennis Vadura)
- Subject: v27i138: dmake - dmake Version 3.8, Part37/41
- Message-ID: <1992Jan29.165139.1724@sparky.imd.sterling.com>
- X-Md4-Signature: 7905b620c26645c45918825ecdc644b5
- Date: Wed, 29 Jan 1992 16:51:39 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: dvadura@plg.waterloo.edu (Dennis Vadura)
- Posting-number: Volume 27, Issue 138
- Archive-name: dmake/part37
- Environment: Atari-ST, Coherent, Mac, MSDOS, OS/2, UNIX
- Supersedes: dmake: Volume 19, Issue 22-58
-
- ---- Cut Here and feed the following to sh ----
- # this is dmake.shar.37 (part 37 of a multipart archive)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file dmake/unix/coherent/vfprintf.c continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 37; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test -f _shar_wnt_.tmp; then
- sed 's/^X//' << 'SHAR_EOF' >> 'dmake/unix/coherent/vfprintf.c' &&
- X case 'X':
- #ifdef UNSIGNEDSPECIAL
- X *tp++ = c;
- X *tp = '\0';
- #ifndef LONGINT
- X if(longflag)
- X count += fprintf(dest, tempfmt, va_arg(args, unsigned long));
- X else
- #endif
- X count += fprintf(dest, tempfmt, va_arg(args, unsigned));
- X break;
- #endif
- X case 'd':
- X case 'c':
- X case 'i':
- X *tp++ = c;
- X *tp = '\0';
- #ifndef LONGINT
- X if(longflag)
- X count += fprintf(dest, tempfmt, va_arg(args, long));
- X else
- #endif
- X count += fprintf(dest, tempfmt, va_arg(args, int));
- X break;
- X case 'f':
- X case 'e':
- X case 'E':
- X case 'g':
- X case 'G':
- X *tp++ = c;
- X *tp = '\0';
- X count += fprintf(dest, tempfmt, va_arg(args, double));
- X break;
- X case 'p':
- X *tp++ = c;
- X *tp = '\0';
- X count += fprintf(dest, tempfmt, va_arg(args, pointer));
- X break;
- X case '-':
- X case '+':
- X case '0':
- X case '1':
- X case '2':
- X case '3':
- X case '4':
- X case '5':
- X case '6':
- X case '7':
- X case '8':
- X case '9':
- X case '.':
- X case ' ':
- X case '#':
- X case 'h':
- X *tp++ = c;
- X goto continue_format;
- X case 'l':
- #ifndef LONGINT
- X longflag = 1;
- X *tp++ = c;
- #endif
- X goto continue_format;
- X case '*':
- X tp += Sprintf(tp, "%d", va_arg(args, int));
- X goto continue_format;
- X case 'n':
- X *va_arg(args, intp) = count;
- X break;
- X case '%':
- X default:
- X putc(c, dest);
- X count++;
- X break;
- X }
- X } else {
- X putc(c, dest);
- X count++;
- X }
- X }
- X return count;
- }
- X
- vprintf(format, args)
- char *format;
- va_list args;
- {
- X return vfprintf(stdout, format, args);
- }
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/vfprintf.c ||
- echo 'restore of dmake/unix/coherent/vfprintf.c failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/vfprintf.c'`"
- test 4312 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/vfprintf.c: original size 4312, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/config.mk ==============
- if test -f 'dmake/unix/config.mk' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/config.mk (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/config.mk' &&
- # This is an OS specific configuration file
- # It assumes that OBJDIR, TARGET and DEBUG are previously defined.
- # It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
- # PRINTER, PRINTFLAGS
- # It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
- #
- PRINTER = hw
- PRINTFLAGS = -P$(PRINTER)
- STARTUPFILE = $(OS)/startup.mk
- CPPFLAGS = $(CFLAGS)
- LDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
- LDARGS = $(LDFLAGS) -o $@ $(LDOBJS) $(LDLIBS)
- X
- # Debug flags
- DB_CFLAGS = -g -DDBUG
- DB_LDFLAGS = -g
- DB_LDLIBS =
- X
- # NO Debug flags
- NDB_CFLAGS = -O
- NDB_LDFLAGS =
- NDB_LDLIBS =
- X
- # Local configuration modifications for CFLAGS.
- CFLAGS += -I$(OS)
- X
- # Sources that must be defined for each different version
- OSSRC := arlib.c dirbrk.c rmprq.c ruletab.c runargv.c
- SRC += $(OSSRC)
- .SETDIR=$(OS) : $(OSSRC)
- X
- # Set source dirs so that we can find files named in this
- # config file.
- .SOURCE.h : $(OS)
- X
- # See if we modify anything in the lower levels.
- .IF $(OSRELEASE) != $(NULL)
- X .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
- .END
- SHAR_EOF
- chmod 0640 dmake/unix/config.mk ||
- echo 'restore of dmake/unix/config.mk failed'
- Wc_c="`wc -c < 'dmake/unix/config.mk'`"
- test 1031 -eq "$Wc_c" ||
- echo 'dmake/unix/config.mk: original size 1031, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/dirbrk.c ==============
- if test -f 'dmake/unix/dirbrk.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/dirbrk.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/dirbrk.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/dirbrk.c,v 1.1 1992/01/24 03:28:27 dvadura Exp $
- -- SYNOPSIS -- define the directory separator string.
- --
- -- DESCRIPTION
- -- Define this string for any character that may appear in a path name
- -- and can be used as a directory separator. Also provide a function
- -- to indicate if a given path begins at the root of the file system.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: dirbrk.c,v $
- X * Revision 1.1 1992/01/24 03:28:27 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- /* Unix only uses / */
- char* DirBrkStr = "/";
- X
- /*
- ** Return TRUE if the name is the full specification of a path name to a file
- ** starting at the root of the file system, otherwise return FALSE
- */
- PUBLIC int
- If_root_path(name)
- char *name;
- {
- X return( strchr(DirBrkStr, *name) != NIL(char) );
- }
- SHAR_EOF
- chmod 0640 dmake/unix/dirbrk.c ||
- echo 'restore of dmake/unix/dirbrk.c failed'
- Wc_c="`wc -c < 'dmake/unix/dirbrk.c'`"
- test 1821 -eq "$Wc_c" ||
- echo 'dmake/unix/dirbrk.c: original size 1821, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/explode.c ==============
- if test -f 'dmake/unix/explode.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/explode.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/explode.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/explode.c,v 1.1 1992/01/24 03:28:28 dvadura Exp $
- -- SYNOPSIS -- Routines to explode dag if .SETDIR targets present.
- --
- -- DESCRIPTION
- -- These routines are called by parallel dmake implementations to
- -- explode the dmake DAG at .SETDIR targets so that parallel makes
- -- can traverse common portions of the DAG in parallel.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: explode.c,v $
- X * Revision 1.1 1992/01/24 03:28:28 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- #include "alloc.h"
- #include "db.h"
- X
- CELLPTR
- Explode_cell( cp, dir )
- CELLPTR cp;
- CELLPTR dir;
- {
- X int explode = FALSE;
- X CELLPTR root;
- X CELLPTR tcp;
- X CELLPTR ocp;
- X HOWPTR fhow = NIL(HOW);
- X
- X
- X if( cp == NIL(CELL) ) return(cp);
- X
- X ocp = cp;
- X if( (root = cp->ce_name->CP_ROOT) != dir ) {
- X if( cp->ce_name->CP_ROOT != NIL(CELL) ) {
- X HASHPTR name;
- X
- X tcp = Def_cell(cp->CE_NAME, dir);
- X name = tcp->ce_name;
- X *tcp = *cp;
- X tcp->ce_name = name;
- X
- X cp = tcp;
- X explode = TRUE;
- X }
- X }
- X else if( root && root == dir )
- X return( cp );
- X
- X /* The code here is required, as it takes care of the .UPDATEALL common
- X * targets. */
- X tcp = cp;
- X do {
- X tcp->ce_name->CP_ROOT = dir;
- X
- X if( tcp->CE_HOW != fhow ) {
- X tcp->CE_HOW = Explode_how( tcp->CE_HOW, cp->ce_dir?cp:dir, explode );
- X if( tcp == cp ) fhow = tcp->CE_HOW;
- X }
- X
- X if( explode && tcp->ce_all )
- X if( tcp->ce_all != ocp ) {
- X CELLPTR ttcp = Def_cell( tcp->ce_all->CE_NAME, dir );
- X HASHPTR name = ttcp->ce_name;
- X
- X *ttcp = *tcp->ce_all;
- X ttcp->ce_name = name;
- X tcp->ce_all = ttcp;
- X ttcp->CE_HOW = fhow;
- X }
- X else
- X tcp->ce_all = cp;
- X
- X tcp = tcp->ce_all;
- X }
- X while( tcp != NIL(CELL) && tcp != cp );
- X
- X return( cp );
- }
- X
- X
- HOWPTR
- Explode_how( how, dir, copy )
- HOWPTR how;
- CELLPTR dir;
- int copy;
- {
- X if( how == NIL(HOW) ) return( how );
- X
- X if( copy ) {
- X HOWPTR thow;
- X
- X TALLOC( thow, 1, HOW );
- X *thow = *how;
- X how = thow;
- X }
- X
- X how->hw_next = Explode_how( how->hw_next, dir, copy );
- X how->hw_prq = Explode_prq( how->hw_prq, dir, copy );
- X
- X return( how );
- }
- X
- X
- LINKPTR
- Explode_prq( prq, dir, copy )
- LINKPTR prq;
- CELLPTR dir;
- int copy;
- {
- X if( prq == NIL(LINK) ) return(prq);
- X
- X if( copy ) {
- X LINKPTR tprq;
- X
- X TALLOC( tprq, 1, LINK );
- X *tprq = *prq;
- X prq = tprq;
- X }
- X
- X prq->cl_next = Explode_prq( prq->cl_next, dir, copy );
- X prq->cl_prq = Explode_cell( prq->cl_prq, dir );
- X
- X return( prq );
- }
- SHAR_EOF
- chmod 0640 dmake/unix/explode.c ||
- echo 'restore of dmake/unix/explode.c failed'
- Wc_c="`wc -c < 'dmake/unix/explode.c'`"
- test 3513 -eq "$Wc_c" ||
- echo 'dmake/unix/explode.c: original size 3513, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/rmprq.c ==============
- if test -f 'dmake/unix/rmprq.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/rmprq.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/rmprq.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/rmprq.c,v 1.1 1992/01/24 03:28:28 dvadura Exp $
- -- SYNOPSIS -- remove prerequisites code.
- --
- -- DESCRIPTION
- -- This code is different for DOS and for UNIX and parallel make
- -- architectures since the parallel case requires the rm's to be
- -- run in parallel, whereas DOS guarantees to run them sequentially.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: rmprq.c,v $
- X * Revision 1.1 1992/01/24 03:28:28 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- PUBLIC void
- Remove_prq( tcp )
- CELLPTR tcp;
- {
- X static LINKPTR rlp = NIL(LINK);
- X static flag = 0;
- X static HASHPTR m_at, m_q, m_b, m_g, m_l, m_bb, m_up;
- X char *m_at_s, *m_g_s, *m_q_s, *m_b_s, *m_l_s, *m_bb_s, *m_up_s;
- X LINKPTR tlp;
- X
- X tcp->ce_flag &= ~(F_MADE|F_VISITED);
- X tcp->ce_time = 0L;
- X
- X for( tlp=rlp; tlp !=NIL(LINK); tlp=tlp->cl_next )
- X if( (tlp->cl_prq->ce_flag & (F_VISITED|F_MADE)) != F_VISITED )
- X break;
- X
- X if( tlp == NIL(LINK) ) {
- X TALLOC(tlp, 1, LINK);
- X TALLOC(tlp->cl_prq, 1, CELL);
- X tlp->cl_next = rlp;
- X rlp = tlp;
- X }
- X
- X *tlp->cl_prq = *tcp;
- X
- X /* We save the dynamic macro values here, as it is possible that the
- X * .REMOVE recipe is getting executed for a target while some other target
- X * is in the middle of executing it's list of recipe lines, in this case
- X * the values of $@ etc, must be preserved so that when we return to
- X * complete the other recipe we must make certain that the values of it's
- X * dynamic macros are unmodified. */
- X
- X if( !flag ) {
- X /* Do the getting of the macros only once. */
- X flag = 1;
- X m_at = Get_name("@", Macs, TRUE);
- X m_g = Get_name(">", Macs, TRUE);
- X m_q = Get_name("?", Macs, TRUE);
- X m_b = Get_name("<", Macs, TRUE);
- X m_l = Get_name("&", Macs, TRUE);
- X m_bb = Get_name("*", Macs, TRUE);
- X m_up = Get_name("^", Macs, TRUE);
- X }
- X
- X m_at_s = m_at->ht_value; m_at->ht_value = NIL(char);
- X m_g_s = m_g->ht_value; m_g->ht_value = NIL(char);
- X m_q_s = m_q->ht_value; m_q->ht_value = NIL(char);
- X m_b_s = m_b->ht_value; m_b->ht_value = NIL(char);
- X m_l_s = m_l->ht_value; m_l->ht_value = NIL(char);
- X m_bb_s = m_bb->ht_value; m_bb->ht_value = NIL(char);
- X m_up_s = m_up->ht_value; m_up->ht_value = NIL(char);
- X
- X Make( tlp->cl_prq, tlp, NIL(CELL) );
- X if( tlp->cl_prq->ce_dir ){
- X FREE(tlp->cl_prq->ce_dir);
- X tlp->cl_prq->ce_dir=NIL(char);
- X }
- X
- X m_at->ht_value = m_at_s;
- X m_g->ht_value = m_g_s;
- X m_q->ht_value = m_q_s;
- X m_b->ht_value = m_b_s;
- X m_l->ht_value = m_l_s;
- X m_bb->ht_value = m_bb_s;
- X m_up->ht_value = m_up_s;
- }
- SHAR_EOF
- chmod 0640 dmake/unix/rmprq.c ||
- echo 'restore of dmake/unix/rmprq.c failed'
- Wc_c="`wc -c < 'dmake/unix/rmprq.c'`"
- test 3643 -eq "$Wc_c" ||
- echo 'dmake/unix/rmprq.c: original size 3643, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/ruletab.c ==============
- if test -f 'dmake/unix/ruletab.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/ruletab.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/ruletab.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/ruletab.c,v 1.1 1992/01/24 03:28:29 dvadura Exp $
- -- SYNOPSIS -- Default initial configuration of dmake.
- --
- -- DESCRIPTION
- -- Define here the initial set of rules that are defined before
- -- dmake performs any processing.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: ruletab.c,v $
- X * Revision 1.1 1992/01/24 03:28:29 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- /* These are control macros for dmake that MUST be defined at some point
- X * if they are NOT dmake will not work! These are default definitions. They
- X * may be overridden inside the .STARTUP makefile, they are here
- X * strictly so that dmake can parse the STARTUP makefile */
- X
- static char *_rules[] = {
- X "MAXPROCESSLIMIT := 10",
- X "MAXLINELENGTH := 8190",
- X ".IMPORT .IGNORE: ROOTDIR",
- X ".MAKEFILES : makefile.mk Makefile makefile",
- X ".SOURCE : .NULL",
- #include "startup.h"
- X 0 };
- X
- char **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
- SHAR_EOF
- chmod 0640 dmake/unix/ruletab.c ||
- echo 'restore of dmake/unix/ruletab.c failed'
- Wc_c="`wc -c < 'dmake/unix/ruletab.c'`"
- test 1948 -eq "$Wc_c" ||
- echo 'dmake/unix/ruletab.c: original size 1948, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/runargv.c ==============
- if test -f 'dmake/unix/runargv.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/runargv.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/runargv.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/runargv.c,v 1.1 1992/01/24 03:28:50 dvadura Exp $
- -- SYNOPSIS -- invoke a sub process.
- --
- -- DESCRIPTION
- -- Use the standard methods of executing a sub process.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: runargv.c,v $
- X * Revision 1.1 1992/01/24 03:28:50 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include <signal.h>
- #include "extern.h"
- #include "sysintf.h"
- X
- typedef struct prp {
- X char *prp_cmd;
- X int prp_group;
- X int prp_ignore;
- X int prp_last;
- X int prp_shell;
- X struct prp *prp_next;
- } RCP, *RCPPTR;
- X
- typedef struct pr {
- X int pr_valid;
- X int pr_pid;
- X CELLPTR pr_target;
- X int pr_ignore;
- X int pr_last;
- X RCPPTR pr_recipe;
- X RCPPTR pr_recipe_end;
- X char *pr_dir;
- } PR;
- X
- static PR *_procs = NIL(PR);
- static int _proc_cnt = 0;
- static int _abort_flg= FALSE;
- static int _use_i = -1;
- static int _do_upd = 0;
- X
- static void _add_child ANSI((int, CELLPTR, int, int));
- static void _attach_cmd ANSI((char *, int, int, CELLPTR, int, int));
- static void _finished_child ANSI((int, int));
- static int _running ANSI((CELLPTR));
- X
- PUBLIC int
- runargv(target, ignore, group, last, shell, cmd)
- CELLPTR target;
- int ignore;
- int group;
- int last;
- int shell;
- char *cmd;
- {
- X extern int errno;
- X extern char *sys_errlist[];
- X int pid;
- X char **argv;
- X
- X if( _running(target) /*&& Max_proc != 1*/ ) {
- X /* The command will be executed when the previous recipe
- X * line completes. */
- X _attach_cmd( cmd, group, ignore, target, last, shell );
- X return(1);
- X }
- X
- X while( _proc_cnt == Max_proc )
- X if( Wait_for_child(FALSE, -1) == -1 ) Fatal( "Lost a child" );
- X
- X argv = Pack_argv( group, shell, cmd );
- X
- X switch( pid=fork() ){
- X int wid;
- X int status;
- X
- X case -1: /* fork failed */
- X Error("%s: %s", argv[0], sys_errlist[errno]);
- X Handle_result(-1, ignore, _abort_flg, target);
- X return(-1);
- X
- X case 0: /* child */
- X execvp(argv[0], argv);
- X Continue = TRUE; /* survive error message */
- X Error("%s: %s", argv[0], sys_errlist[errno]);
- X kill(getpid(), SIGTERM);
- X /*NOTREACHED*/
- X
- X default: /* parent */
- X _add_child(pid, target, ignore, last);
- X }
- X
- X return(1);
- }
- X
- X
- PUBLIC int
- Wait_for_child( abort_flg, pid )
- int abort_flg;
- int pid;
- {
- X int wid;
- X int status;
- X int waitchild;
- X
- X waitchild = (pid == -1)? FALSE : Wait_for_completion;
- X
- X do {
- X if( (wid = wait(&status)) == -1 ) return(-1);
- X
- X _abort_flg = abort_flg;
- X _finished_child(wid, status);
- X _abort_flg = FALSE;
- X }
- X while( waitchild && pid != wid );
- X
- X return(0);
- }
- X
- X
- PUBLIC void
- Clean_up_processes()
- {
- X register int i;
- X
- X if( _procs != NIL(PR) ) {
- X for( i=0; i<Max_proc; i++ )
- X if( _procs[i].pr_valid )
- X kill(_procs[i].pr_pid, SIGTERM);
- X
- X while( Wait_for_child(TRUE, -1) != -1 );
- X }
- }
- X
- X
- static void
- _add_child( pid, target, ignore, last )
- int pid;
- CELLPTR target;
- int ignore;
- int last;
- {
- X register int i;
- X register PR *pp;
- X
- X if( _procs == NIL(PR) ) {
- X TALLOC( _procs, Max_proc, PR );
- X }
- X
- X if( (i = _use_i) == -1 )
- X for( i=0; i<Max_proc; i++ )
- X if( !_procs[i].pr_valid )
- X break;
- X
- X pp = _procs+i;
- X
- X pp->pr_valid = 1;
- X pp->pr_pid = pid;
- X pp->pr_target = target;
- X pp->pr_ignore = ignore;
- X pp->pr_last = last;
- X pp->pr_dir = _strdup(Get_current_dir());
- X
- X Current_target = NIL(CELL);
- X
- X _proc_cnt++;
- X
- X if( Wait_for_completion ) Wait_for_child( FALSE, pid );
- }
- X
- X
- static void
- _finished_child(pid, status)
- int pid;
- int status;
- {
- X register int i;
- X register PR *pp;
- X char *dir;
- X
- X for( i=0; i<Max_proc; i++ )
- X if( _procs[i].pr_valid && _procs[i].pr_pid == pid )
- X break;
- X
- X /* Some children we didn't make esp true if using /bin/sh to execute a
- X * a pipe and feed the output as a makefile into dmake. */
- X if( i == Max_proc ) return;
- X _procs[i].pr_valid = 0;
- X _proc_cnt--;
- X dir = _strdup(Get_current_dir());
- X Set_dir( _procs[i].pr_dir );
- X
- X if( _procs[i].pr_recipe != NIL(RCP) && !_abort_flg ) {
- X RCPPTR rp = _procs[i].pr_recipe;
- X
- X
- X Current_target = _procs[i].pr_target;
- X Handle_result( status, _procs[i].pr_ignore, FALSE, _procs[i].pr_target );
- X Current_target = NIL(CELL);
- X
- X _procs[i].pr_recipe = rp->prp_next;
- X
- X _use_i = i;
- X runargv( _procs[i].pr_target, rp->prp_ignore, rp->prp_group,
- X rp->prp_last, rp->prp_shell, rp->prp_cmd );
- X _use_i = -1;
- X
- X FREE( rp->prp_cmd );
- X FREE( rp );
- X
- X if( _proc_cnt == Max_proc ) Wait_for_child( FALSE, -1 );
- X }
- X else {
- X Unlink_temp_files( _procs[i].pr_target );
- X Handle_result(status,_procs[i].pr_ignore,_abort_flg,_procs[i].pr_target);
- X
- X if( _procs[i].pr_last ) {
- X FREE(_procs[i].pr_dir );
- X
- X if( !Doing_bang ) Update_time_stamp( _procs[i].pr_target );
- X }
- X }
- X
- X Set_dir(dir);
- X FREE(dir);
- }
- X
- X
- static int
- _running( cp )
- CELLPTR cp;
- {
- X register int i;
- X
- X if( !_procs ) return(FALSE);
- X
- X for( i=0; i<Max_proc; i++ )
- X if( _procs[i].pr_valid &&
- X _procs[i].pr_target == cp )
- X break;
- X
- X return( i != Max_proc );
- }
- X
- X
- static void
- _attach_cmd( cmd, group, ignore, cp, last, shell )
- char *cmd;
- int group;
- int ignore;
- CELLPTR cp;
- int last;
- int shell;
- {
- X register int i;
- X RCPPTR rp;
- X
- X for( i=0; i<Max_proc; i++ )
- X if( _procs[i].pr_valid &&
- X _procs[i].pr_target == cp )
- X break;
- X
- X TALLOC( rp, 1, RCP );
- X rp->prp_cmd = _strdup(cmd);
- X rp->prp_group = group;
- X rp->prp_ignore= ignore;
- X rp->prp_last = last;
- X rp->prp_shell = shell;
- X
- X if( _procs[i].pr_recipe == NIL(RCP) )
- X _procs[i].pr_recipe = _procs[i].pr_recipe_end = rp;
- X else {
- X _procs[i].pr_recipe_end->prp_next = rp;
- X _procs[i].pr_recipe_end = rp;
- X }
- }
- SHAR_EOF
- chmod 0640 dmake/unix/runargv.c ||
- echo 'restore of dmake/unix/runargv.c failed'
- Wc_c="`wc -c < 'dmake/unix/runargv.c'`"
- test 6767 -eq "$Wc_c" ||
- echo 'dmake/unix/runargv.c: original size 6767, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/startup.h ==============
- if test -f 'dmake/unix/startup.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/startup.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/startup.h' &&
- /* This file contains the default value of the MAKESTARTUP variable.
- X * You must set the quoted string below to the default path to the startup
- X * variable, so that it gets compiled in. LEAVE ROOTDIR at the front of
- X * the path. This allows the user to customize his environment for dmake
- X * by setting up a new ROOTDIR environment variable. */
- X
- "MAKESTARTUP := $(ROOTDIR)/usr/software/dmake/data/startup.mk",
- SHAR_EOF
- chmod 0640 dmake/unix/startup.h ||
- echo 'restore of dmake/unix/startup.h failed'
- Wc_c="`wc -c < 'dmake/unix/startup.h'`"
- test 412 -eq "$Wc_c" ||
- echo 'dmake/unix/startup.h: original size 412, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/sysintf.h ==============
- if test -f 'dmake/unix/sysintf.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/sysintf.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/sysintf.h' &&
- /*
- ** assorted bits of system interface, for common routines inside dmake.
- ** System specific code can be found in the config.h files for each
- ** of the system specifications.
- */
- #define STAT stat
- #define VOID_LCACHE(l,m) (void) void_lcache(l,m)
- #define Hook_std_writes(A)
- #define GETPID getpid()
- X
- /*
- ** standard C items
- */
- X
- /*
- ** DOS interface standard items
- */
- #define getswitchar() '-'
- X
- /*
- ** make parameters
- */
- #define MAX_PATH_LEN 1024
- SHAR_EOF
- chmod 0640 dmake/unix/sysintf.h ||
- echo 'restore of dmake/unix/sysintf.h failed'
- Wc_c="`wc -c < 'dmake/unix/sysintf.h'`"
- test 441 -eq "$Wc_c" ||
- echo 'dmake/unix/sysintf.h: original size 441, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/sysvr1/config.h ==============
- if test ! -d 'dmake/unix/sysvr1'; then
- mkdir 'dmake/unix/sysvr1'
- fi
- if test -f 'dmake/unix/sysvr1/config.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/sysvr1/config.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/sysvr1/config.h' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/sysvr1/config.h,v 1.1 1992/01/24 03:28:18 dvadura Exp $
- -- SYNOPSIS -- Configurarion include file.
- --
- -- DESCRIPTION
- -- There is one of these for each specific machine configuration.
- -- It can be used to further tweek the machine specific sources
- -- so that they compile.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: config.h,v $
- X * Revision 1.1 1992/01/24 03:28:18 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- /* define this for configurations that don't have the coreleft function
- X * so that the code compiles. To my knowledge coreleft exists only on
- X * Turbo C, but it is needed here since the function is used in many debug
- X * macros. */
- #define coreleft() 0L
- X
- /* Define the getcwd function that is used in the code, since BSD does
- X * not have getcwd, but call it getwd instead. */
- extern char *getcwd ANSI((char *, int));
- X
- /* Define setvbuf, SysV doesn't have one */
- #define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
- X
- /* We don't care about CONST */
- #define CONST
- X
- /* a small problem with pointer to voids on some unix machines needs this */
- #define PVOID void *
- SHAR_EOF
- chmod 0640 dmake/unix/sysvr1/config.h ||
- echo 'restore of dmake/unix/sysvr1/config.h failed'
- Wc_c="`wc -c < 'dmake/unix/sysvr1/config.h'`"
- test 2107 -eq "$Wc_c" ||
- echo 'dmake/unix/sysvr1/config.h: original size 2107, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/sysvr1/config.mk ==============
- if test -f 'dmake/unix/sysvr1/config.mk' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/sysvr1/config.mk (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/sysvr1/config.mk' &&
- # This is the SysV R3 UNIX configuration file for DMAKE
- # It simply modifies the values of SRC, and checks to see if
- # OSENVIRONMENT is defined. If so it includes the appropriate
- # config.mk file.
- #
- # It also sets the values of .SOURCE.c and .SOURCE.h to include the local
- # directory.
- #
- osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
- X
- # The following are required sources
- OSDSRC := vfprintf.c
- X
- .IF $(OSDSRC)
- X SRC += $(OSDSRC)
- X .SETDIR=$(osrdir) : $(OSDSRC)
- .END
- X
- .SOURCE.h : $(osrdir)
- X
- # Local configuration modifications for CFLAGS, there's local SysV includes
- # too.
- CFLAGS += -I$(osrdir)
- X
- # See if we modify anything in the lower levels.
- .IF $(OSENVIRONMENT) != $(NULL)
- X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
- .END
- SHAR_EOF
- chmod 0640 dmake/unix/sysvr1/config.mk ||
- echo 'restore of dmake/unix/sysvr1/config.mk failed'
- Wc_c="`wc -c < 'dmake/unix/sysvr1/config.mk'`"
- test 761 -eq "$Wc_c" ||
- echo 'dmake/unix/sysvr1/config.mk: original size 761, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/sysvr1/make.sh ==============
- if test -f 'dmake/unix/sysvr1/make.sh' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/sysvr1/make.sh (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/sysvr1/make.sh' &&
- mkdir objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O infer.c
- mv infer.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O make.c
- mv make.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O stat.c
- mv stat.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O expand.c
- mv expand.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O dmstring.c
- mv dmstring.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O hash.c
- mv hash.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O dag.c
- mv dag.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O dmake.c
- mv dmake.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O path.c
- mv path.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O imacs.c
- mv imacs.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O sysintf.c
- mv sysintf.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O parse.c
- mv parse.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O getinp.c
- mv getinp.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O quit.c
- mv quit.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O state.c
- mv state.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O basename.c
- mv basename.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O dmdump.c
- mv dmdump.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O macparse.c
- mv macparse.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O rulparse.c
- mv rulparse.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O percent.c
- mv percent.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O function.c
- mv function.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O unix/arlib.c
- mv arlib.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O unix/dirbrk.c
- mv dirbrk.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O unix/rmprq.c
- mv rmprq.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O unix/ruletab.c
- mv ruletab.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O unix/runargv.c
- mv runargv.o objects
- cc -c -I. -Iunix -Iunix/sysvr1 -O unix/sysvr1/vfprintf.c
- mv vfprintf.o objects
- cc -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o objects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o objects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o objects/quit.o objects/state.o objects/basename.o objects/dmdump.o objects/macparse.o objects/rulparse.o objects/percent.o objects/function.o objects/arlib.o objects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/vfprintf.o
- cp unix/sysvr1/startup.mk startup.mk
- SHAR_EOF
- chmod 0640 dmake/unix/sysvr1/make.sh ||
- echo 'restore of dmake/unix/sysvr1/make.sh failed'
- Wc_c="`wc -c < 'dmake/unix/sysvr1/make.sh'`"
- test 2251 -eq "$Wc_c" ||
- echo 'dmake/unix/sysvr1/make.sh: original size 2251, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/sysvr1/public.h ==============
- if test -f 'dmake/unix/sysvr1/public.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/sysvr1/public.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/sysvr1/public.h' &&
- /* RCS -- $Header$
- -- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
- --
- -- SYNOPSIS -- Local functions exported to be visible by others.
- --
- -- DESCRIPTION
- -- This file is generated by 'genpub'. Function declarations
- -- that appear in this file are extracted by 'genpub' from
- -- source files. Any function in the source file whose definition
- -- appears like:
- --
- -- PUBLIC return_type
- -- function( arg_list );
- -- type_expr1 arg1;
- -- ...
- --
- -- has its definition extracted and a line of the form:
- --
- -- return_type function ANSI((type_expr1,type_expr2,...));
- --
- -- entered into the output file.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log$
- */
- X
- #ifndef _DMAKE_PUBLIC_h
- #define _DMAKE_PUBLIC_h
- X
- void Infer_recipe ANSI((CELLPTR, CELLPTR));
- int Make_targets ANSI(());
- int Exec_commands ANSI((CELLPTR));
- void Print_cmnd ANSI((char *, int, int));
- void Pop_dir ANSI((int));
- void Append_line ANSI((char *, int, FILE *, char *, int, int));
- void Stat_target ANSI((CELLPTR, int));
- char * Expand ANSI((char *));
- char * Apply_edit ANSI((char *, char *, char *, int, int));
- void Map_esc ANSI((char *));
- char* Apply_modifiers ANSI((int, char *));
- char* Tokenize ANSI((char *, char *));
- char * _strjoin ANSI((char *, char *, int, int));
- char * _stradd ANSI((char *, char *, int));
- char * _strapp ANSI((char *, char *));
- char * _strdup ANSI((char *));
- char * _strdup2 ANSI((char *));
- char * _strpbrk ANSI((char *, char *));
- char * _strspn ANSI((char *, char *));
- char * _strstr ANSI((char *, char *));
- char * _substr ANSI((char *, char *));
- uint16 Hash ANSI((char *, uint32 *));
- HASHPTR Get_name ANSI((char *, HASHPTR *, int));
- HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
- HASHPTR Def_macro ANSI((char *, char *, int));
- CELLPTR Def_cell ANSI((char *));
- LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
- void Clear_prerequisites ANSI((CELLPTR));
- int Test_circle ANSI((CELLPTR, int));
- STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
- t_attr Rcp_attribute ANSI((char *));
- int main ANSI((int, char **));
- FILE * Openfile ANSI((char *, int, int));
- FILE * Closefile ANSI(());
- FILE * Search_file ANSI((char *, char **));
- char * Filename ANSI(());
- int Nestlevel ANSI(());
- void No_ram ANSI(());
- int Usage ANSI((int));
- int Version ANSI(());
- char * Get_suffix ANSI((char *));
- char * Build_path ANSI((char *, char *));
- void Make_rules ANSI(());
- void Create_macro_vars ANSI(());
- time_t Do_stat ANSI((char *, char *, char **));
- int Do_touch ANSI((char *, char *, char **));
- void Void_lib_cache ANSI((char *, char *));
- time_t Do_time ANSI(());
- int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
- char ** Pack_argv ANSI((int, int, char *));
- char * Read_env_string ANSI((char *));
- int Write_env_string ANSI((char *, char *));
- void ReadEnvironment ANSI(());
- void Catch_signals ANSI((void (*)()));
- void Clear_signals ANSI(());
- void Prolog ANSI((int, char* []));
- void Epilog ANSI((int));
- char * Get_current_dir ANSI(());
- int Set_dir ANSI((char*));
- char Get_switch_char ANSI(());
- FILE* Get_temp ANSI((char **, char *, int));
- FILE * Start_temp ANSI((char *, CELLPTR, char **));
- void Open_temp_error ANSI((char *, char *));
- void Link_temp ANSI((CELLPTR, FILE *, char *));
- void Close_temp ANSI((CELLPTR, FILE *));
- void Unlink_temp_files ANSI((CELLPTR));
- void Handle_result ANSI((int, int, int, CELLPTR));
- void Update_time_stamp ANSI((CELLPTR));
- int Remove_file ANSI((char *));
- void Parse ANSI((FILE *));
- int Get_line ANSI((char *, FILE *));
- char * Do_comment ANSI((char *, char **, int));
- char * Get_token ANSI((TKSTRPTR, char *, int));
- void Quit ANSI(());
- void Read_state ANSI(());
- void Write_state ANSI(());
- int Check_state ANSI((CELLPTR, STRINGPTR *, int));
- char* basename ANSI((char *));
- void Dump ANSI(());
- void Dump_recipe ANSI((STRINGPTR));
- int Parse_macro ANSI((char *, int));
- int Macro_op ANSI((char *));
- int Parse_rule_def ANSI((int *));
- int Rule_op ANSI((char *));
- void Add_recipe_to_list ANSI((char *, int, int));
- void Bind_rules_to_targets ANSI((int));
- int Set_group_attributes ANSI((char *));
- DFALINKPTR Match_dfa ANSI((char *));
- void Check_circle_dfa ANSI(());
- void Add_nfa ANSI((char *));
- char * Exec_function ANSI((char *));
- time_t seek_arch ANSI((char *, char *));
- int If_root_path ANSI((char *));
- void Remove_prq ANSI((CELLPTR));
- int runargv ANSI((CELLPTR, int, int, int, int, char *));
- int Wait_for_child ANSI((int, int));
- void Clean_up_processes ANSI(());
- X
- #endif
- SHAR_EOF
- chmod 0640 dmake/unix/sysvr1/public.h ||
- echo 'restore of dmake/unix/sysvr1/public.h failed'
- Wc_c="`wc -c < 'dmake/unix/sysvr1/public.h'`"
- test 5448 -eq "$Wc_c" ||
- echo 'dmake/unix/sysvr1/public.h: original size 5448, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/sysvr1/putenv.c ==============
- if test -f 'dmake/unix/sysvr1/putenv.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/sysvr1/putenv.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/sysvr1/putenv.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/sysvr1/putenv.c,v 1.1 1992/01/24 03:28:26 dvadura Exp $
- -- SYNOPSIS -- my own putenv for BSD like systems.
- --
- -- DESCRIPTION
- -- This originally came from MKS, but I rewrote it to fix a bug with
- -- replacing existing strings, probably never happened but the code
- -- was wrong nonetheless.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- SHAR_EOF
- true || echo 'restore of dmake/unix/sysvr1/putenv.c failed'
- fi
- echo 'End of part 37, continue with part 38'
- echo 38 > _shar_seq_.tmp
- exit 0
- exit 0 # Just in case...
-